-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(structure): enable published chip for live edit documents #8000
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
Component Testing Report Updated Dec 10, 2024 9:00 AM (UTC) ✅ All Tests Passed -- expand for details
|
⚡️ Editor Performance ReportUpdated Tue, 10 Dec 2024 09:02:09 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
if (!editState?.published) { | ||
return true | ||
} | ||
// If it's a live edit document the only option to edit it is through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice simplification 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Description
Enables the published chip for
liveEdit
documents.Live edit documents are only editable through the published perspective, we need to enable it even if the published document doesn't exists.
For the rest of documents, validate if the
published
document exists.Update actions data-testid
action tests were failing because the test id was not found, this updates them to match what we have in
next
.https://github.com/sanity-io/sanity/blob/next/packages/sanity/src/structure/panes/document/statusBar/DocumentStatusBarActions.tsx#L62What to review
Testing
Notes for release